import ajax from './index'



export function industry_list(condition) {
  if (!condition) {
    condition = {
      page: 1,
      num: 100
    }
  }
  return ajax({
    url: "/backend/industry/list",
    method: "get",
    params: condition
  });
}
export function industry_all(condition) {
  return ajax({
    url: "/backend/industry/listAll",
    method: "get",
    params: condition
  });
}

export function industry_add(param) {
  return ajax({
    url: "/backend/industry/create",
    method: "post",
    data: param
  });
}

export function industry_edit(id, param) {
  return ajax({
    url: "/backend/industry/update/" + id,
    method: "post",
    data: param
  });
}

export function industry_del(id) {
  return ajax({
    url: "/backend/industry/delete?ids=" + id,
    method: "post"
  });
}

export function industry_detail(id) {
  return ajax({
    url: "/backend/industry/detail/" + id,
    method: "get"
  });
}
export function industry_category_list(condition) {
  if (!condition) {
    condition = {
      page: 1,
      num: 100
    }
  }
  return ajax({
    url: "/backend/industry_category/list",
    method: "get",
    params: condition
  });
}
export function industry_category_all(condition) {
  return ajax({
    url: "/backend/industry_category/listAll",
    method: "get",
    params: condition
  });
}

export function industry_category_add(param) {
  return ajax({
    url: "/backend/industry_category/create",
    method: "post",
    data: param
  });
}

export function industry_category_edit(id, param) {
  return ajax({
    url: "/backend/industry_category/update/" + id,
    method: "post",
    data: param
  });
}

export function industry_category_del(id) {
  return ajax({
    url: "/backend/industry_category/delete?ids=" + id,
    method: "post"
  });
}

export function industry_category_detail(id) {
  return ajax({
    url: "/backend/industry_category/detail/" + id,
    method: "get"
  });
}

export function industry_brand_list(condition) {
  if (!condition) {
    condition = {
      page: 1,
      num: 100
    }
  }
  return ajax({
    url: "/backend/industry_brand/list",
    method: "get",
    params: condition
  });
}

export function industry_brand_all(condition) {
  return ajax({
    url: "/backend/industry_brand/listAll",
    method: "get",
    params: condition
  });
}

export function industry_brand_add(param) {
  return ajax({
    url: "/backend/industry_brand/create",
    method: "post",
    data: param
  });
}

export function industry_brand_edit(id, param) {
  return ajax({
    url: "/backend/industry_brand/update/" + id,
    method: "post",
    data: param
  });
}

export function industry_brand_del(id) {
  return ajax({
    url: "/backend/industry_brand/delete?ids=" + id,
    method: "post"
  });
}

export function industry_brand_detail(id) {
  return ajax({
    url: "/backend/industry_brand/detail/" + id,
    method: "get"
  });
}

export function category_sku_list(condition) {
  if (!condition) {
    condition = {
      page: 1,
      num: 100
    }
  }
  return ajax({
    url: "/backend/category_sku/list",
    method: "get",
    params: condition
  });
}

export function category_sku_all(condition) {
  return ajax({
    url: "/backend/category_sku/listAll",
    method: "get",
    params: condition
  });
}

export function category_sku_add(param) {
  return ajax({
    url: "/backend/category_sku/create",
    method: "post",
    data: param
  });
}

export function category_sku_edit(id, param) {
  return ajax({
    url: "/backend/category_sku/update/" + id,
    method: "post",
    data: param
  });
}

export function category_sku_del(id) {
  return ajax({
    url: "/backend/category_sku/delete?ids=" + id,
    method: "post"
  });
}

export function category_sku_detail(id) {
  return ajax({
    url: "/backend/category_sku/detail/" + id,
    method: "get"
  });
}

export function industry_category_tree(id) {
  return ajax({
    url: "/backend/industry_category/tree/" + id,
    method: "get"
  });
}
